
<template>
    <div class="dialog">
        <el-dialog v-model="isDialog" :modal='true' title="提示">
            <div class="dialog-content">{{ props.message }}</div>
            <div class="dialog-btns">
                <el-button type="primary" @click="close">关闭</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const emit = defineEmits(['update:isDialog'])
const props = defineProps<{
    message: string
    isDialog: boolean
}>()
const close = () => {
    const isDialog=false
    emit('update:isDialog', false)
}
console.log(props.message);
const isDialog = ref(props.isDialog)
const message = ref('')
</script>

<style scoped>
.dialog{
    background-color: white;
    width: 30%;
}
.dialog-content{
    text-align: center;
    font-size: 18px;
    color: #333;
    width: 100%;
    padding: 3%;
}
.dialog-btns{
    width: 100%;
    display: flex;
    justify-content:space-around;
}

</style>